package org.jspar.route;

import java.util.Comparator;


public class InTrailOrder implements Comparator<Expansion>{

	@Override
	public int compare(Expansion e1, Expansion e2) {
		Trail t1 = e1.examineBestTrailInExpansionGroup();
	    Trail t2 = e2.examineBestTrailInExpansionGroup();
	    if (t1 == null)
	    	return 1;
	    if (t2 == null)
	    	return -1;
	    if (t1.cost() <=  t2.cost())
	    	return -1;
	    return 1;
	}

}
